﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;

namespace Tornado
{
    class SignalProcessPower : SignalProcesser
    {

        public override SignalCodes Code
        {
            get { return SignalCodes.POWER; }
        }

        public override void Process(ref SignalPacket p)
        {
            switch ((PowerExCode)p.ExtensionCode)
            {
                case PowerExCode.Standby:
                    WinPower.Standby();
                    break;
                case PowerExCode.Lock:
                    WinPower.Lock();
                    break;
                case PowerExCode.LogOff:
                    WinPower.LogOff();
                    break;
                case PowerExCode.Shutdown:
                    WinPower.Shutdown();
                    break;
                case PowerExCode.Hibernate:
                    WinPower.Hibernate();
                    break;
                case PowerExCode.Restart:
                    WinPower.Restart();
                    break;
            }
        }
    }
}
